package com.ruoyi.room.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.dto.RoomPageBuildDTO;
import com.ruoyi.room.service.ITbResidentsService;
import com.ruoyi.vo.RoomPageBuildVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-08-29
 */
@RestController
@RequestMapping("/residents/")
public class TbResidentsController {
    @Autowired
    ITbResidentsService itbResidentsService;
    //分页查询
    @PostMapping("pageList")
    public AjaxResult pageList(Integer pageNum, Integer pageSize, @RequestBody RoomPageBuildVO roomPageBuildVO){
       Page<RoomPageBuildDTO> page = itbResidentsService.pageList(pageNum, pageSize,roomPageBuildVO);
        return AjaxResult.success(page);
    }

}
